<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/components/Memberkt.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\index.html">All files</a> / <a href="index.html">src/components</a> Memberkt.vue
    </h1>
    <div class='clearfix'>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
  &lt;div id="app"&gt;
      &lt;van-image width="100%"  height="210" :src="info.qyimg" class="gqimg" /&gt;
      &lt;div class="kt-cont"&gt;
        &lt;div v-html="about.content"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="h-30"&gt;&lt;/div&gt;
      &lt;div class="h-20"&gt;&lt;/div&gt;
      &lt;div id="pad-ws"&gt;
        &lt;p class="VIP-title"&gt;VIP 会员&lt;/p&gt;
        &lt;p class="vip-money"&gt;&lt;span class="vip-money-span"&gt;￥&lt;/span&gt;{{info.vipmoney}}&lt;span class="vip-money-span"&gt;元&lt;/span&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="h-20"&gt;&lt;/div&gt;
      &lt;van-button class="btn" block color="linear-gradient(to right, #f8c897, #b27b45)" round @click="zhifu"&gt;   立即开通，尽享权益&lt;/van-button&gt;
      &lt;div class="h-20"&gt;&lt;/div&gt;
      &lt;div id="pad-ws"&gt;
        &lt;van-checkbox  class="about-xx" v-model="checked" checked-color="#bf8d5e" shape="square"&gt;我已阅读并同意&lt;router-link :to="'/about?id=15'"&gt;《 用户协议 》&lt;/router-link&gt;&lt;/van-checkbox&gt;
      &lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;
&lt;script&gt;
<span class="cstat-no" title="statement not covered" >  import Vue from 'vue';</span>
<span class="cstat-no" title="statement not covered" >  import { Toast } from 'vant';</span>
export default {
<span class="fstat-no" title="function not covered" >  data () {</span>
<span class="cstat-no" title="statement not covered" >    return {</span>
      info:[],
      id:'',
      about:[],
      checked: false,
    }
  },
  components: {
  },
<span class="fstat-no" title="function not covered" >  created:function () {</span>
<span class="cstat-no" title="statement not covered" >    this.$emit('footer', false);</span>
  },
&nbsp;
<span class="fstat-no" title="function not covered" >  mounted () {</span>
<span class="cstat-no" title="statement not covered" >    this.recordapi();</span>
  },
  	methods: {
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >      zhifu(){</span></span>
<span class="cstat-no" title="statement not covered" >        var that= this;</span>
<span class="cstat-no" title="statement not covered" >        var userid = this.$cookieStore.getCookie('userid');</span>
<span class="cstat-no" title="statement not covered" >        var money = that.value;</span>
<span class="cstat-no" title="statement not covered" >        if(that.checked == false){</span>
<span class="cstat-no" title="statement not covered" >           this.$toast('请勾选协议');</span>
<span class="cstat-no" title="statement not covered" >          return;</span>
        }
<span class="cstat-no" title="statement not covered" >        console.log(money)</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        that.$api.post("/member/moneysave",{'userid':userid,'money':money}).then(res =&gt; {</span></span>
          // if(res.code==1){
          //   Toast(res.msg);
          //   that.list = [];
          //   that.page = 1;
          //   this.asideData();
          // }else{
          //   Toast(res.msg);
          // }
<span class="cstat-no" title="statement not covered" >           that.callpay(res);</span>
<span class="cstat-no" title="statement not covered" >            console.log(res);</span>
<span class="cstat-no" title="statement not covered" >            console.log(this);</span>
        })
      },
&nbsp;
<span class="fstat-no" title="function not covered" >      callpay: function(result) {</span>
<span class="cstat-no" title="statement not covered" >          let that = this;</span>
<span class="cstat-no" title="statement not covered" >          if (typeof WeixinJSBridge == "undefined") {</span>
<span class="cstat-no" title="statement not covered" >              if (document.addEventListener) {</span>
<span class="cstat-no" title="statement not covered" >                  document.addEventListener("WeixinJSBridgeReady",that.jsApiCall(result),false);</span>
<span class="cstat-no" title="statement not covered" >              } else if (document.attachEvent) {</span>
<span class="cstat-no" title="statement not covered" >                  document.attachEvent("WeixinJSBridgeReady",that.jsApiCall(result));</span>
<span class="cstat-no" title="statement not covered" >                  document.attachEvent("onWeixinJSBridgeReady",that.jsApiCall(result));</span>
              }
          } else {
<span class="cstat-no" title="statement not covered" >              that.jsApiCall(result);</span>
          }
      },
<span class="fstat-no" title="function not covered" >      jsApiCall:function(result) {</span>
<span class="cstat-no" title="statement not covered" >        let that = this;</span>
<span class="cstat-no" title="statement not covered" >        WeixinJSBridge.invoke(</span>
<span class="fstat-no" title="function not covered" >          'getBrandWCPayRequest',{</span>
            "appId":result.config.appId,           //公众号名称，由商户传入
            "timeStamp":result.config.timestamp,   //时间戳，自1970年以来的秒数
            "nonceStr":result.config.nonceStr,     //随机串
            "package":result.config.package,
            "signType":result.config.signType,     //微信签名方式：
            "paySign":result.config.paySign        //微信签名
          },
          function(res){
<span class="cstat-no" title="statement not covered" >            console.log(res);</span>
<span class="cstat-no" title="statement not covered" >            if(res.err_msg == "get_brand_wcpay_request:ok") {</span>
<span class="cstat-no" title="statement not covered" >              Toast.success('支付成功');</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >              setTimeout(function () {</span></span>
<span class="cstat-no" title="statement not covered" >                that.$router.push({path:'/Member'});</span>
              }, 1000);
              // 支付成功可以进行页面跳转
<span class="cstat-no" title="statement not covered" >            }else if(res.err_msg == "get_brand_wcpay_request:cancel"){</span>
<span class="cstat-no" title="statement not covered" >              Toast.fail('用户取消支付');</span>
            }else{
<span class="cstat-no" title="statement not covered" >              Toast.fail('支付失败');</span>
            }
          }
        );
      },
&nbsp;
&nbsp;
<span class="fstat-no" title="function not covered" >      recordapi(){</span>
<span class="cstat-no" title="statement not covered" >          var that = this;</span>
<span class="cstat-no" title="statement not covered" >          var userid = that.$cookieStore.getCookie('userid');</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >          that.$api.post("/Index/memberkt",{'id':that.id}).then(res =&gt; {</span></span>
<span class="cstat-no" title="statement not covered" >            console.log(res);</span>
<span class="cstat-no" title="statement not covered" >            that.info = res.info;</span>
<span class="cstat-no" title="statement not covered" >            that.about = res.info.about;</span>
          });
      },
    }
}
&lt;/script&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Mon Nov 27 2023 23:16:11 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\sorter.js"></script>
</body>
</html>
